<template>
  <div id="page1">
    <p>23430104 董宇轩 首页</p>
    <el-row>
      <el-button>默认按钮</el-button>
      <el-button type="primary">1</el-button>
      <el-button type="success">2</el-button>
      <el-button type="info">3</el-button>
      <el-button type="warning">4</el-button>
      <el-button type="danger">5</el-button>
    </el-row>
    {{ student.name }}
    {{ student2 }}
    <div v-for="item in student2 " :key="item.name">
      {{ item.name }}
    </div>

    <el-carousel indicator-position="outside">
      <el-carousel-item v-for="item in student3" :key="item.imgname">
        <img :src="item.imgurl" style="width:100%;height:inherit" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: "page1",
  data() {
    return {
      student: { name: "董宇轩", age: 18, isStudent: true, city: "Guangzhou" },
      student2: [
        { name: "张三", age: 18 },
        { name: "李四", age: 19 },
        { name: "王五", age: 20 },
        { name: "王六", age: 21 },
      ],
      student3: [
        { "imgname": "1", "imgurl": require('../assets/img/1.jpeg') },
        { "imgname": "2", "imgurl": require('../assets/img/2.jpeg') },
        { "imgname": "3", "imgurl": require('../assets/img/3.jpeg') }
      ]
    };
  }
};
</script>

<style>
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
